package com.ferryc.modules.sys.entity;

import org.junit.Ignore;

import com.ferryc.commons.entity.DataEntity;
import com.ferryc.constant.CommonConstants;
import com.ferryc.modules.sys.util.DictUtils;

/**
 * 
 * 类名: SysMenu <br/>
 * 作用： <br/>
 * 方法： <br/>
 * 创建者: Ferry C <br/>
 * 添加时间: 2017年11月26日 04:09:02 <br/>
 * 
 */
public class SysMenu extends DataEntity<SysMenu> {
	private static final long serialVersionUID = 1L;
	/** 系统默认父Id */
	public static final String SYSTEM_PARENT_ID = "0";
	/** 系统默认Id */
	public static final String SYSTEM_ID = "1";

	/**
	 * 菜单类型,1：菜单；2：按钮
	 * 
	 * @author ferry
	 *
	 */
	public enum MenuType {
		MENU("01"), BUTTON("02");

		private String value;

		private MenuType(String value) {
			this.value = value;
		}

		public String getValue() {
			return value;
		}
	}

	/** MenuName */
	private String menuName;

	/** 资源类型 */
	private String type;

	/** 图标 */
	private String icon;

	/** 资源路径 */
	private String url;

	/** ParentId */
	private String parentId;

	/** 权限字符串 */
	private String permission;

	/** 排序 */
	private int sort;

	private String typeName;

	private String selected;

	private String parentIdAndId;

	private String parentName;

	public String getMenuName() {
		return this.menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getParentId() {
		return this.parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getPermission() {
		return this.permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public String getTypeName() {
		return DictUtils.getDictLabel(this.type, CommonConstants.MENU_TYPE, "");
	}

	@Ignore
	public String getSelected() {
		return selected;
	}

	public void setSelected(String selected) {
		this.selected = selected;
	}

	@Ignore
	public String getParentIdAndId() {
		return parentIdAndId;
	}

	public void setParentIdAndId(String parentIdAndId) {
		this.parentIdAndId = parentIdAndId;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

}